# Scripts that Generates Main Results (2020-11 on)

This folder includes scripts that generates the main results used in the paper. The sequence of scripts indicate potential dependency.
* \* denotes particularly important scripts.
* ^- denotes scripts that one can ignore for now.

## Description of Scripts

| Script | Description |
|:---------|:---------|
| `sv_weights.do` | Calculates different SV weights to be used for all changes based means, regs|
| `data_wgt_ind.do` | Generate industry weight that we usually use in regressions (average employment share). |
| `data_cw_ind_ir.do` | Generate the percentile of industry by change in ln(markets). |
| `mkt_d_sect_sum.do` | SV-weighted change in ln(average # of markets) by sector. |
| `mkt_d_sect_sum_alt.do` | SV-weighted change in ln(average # of markets) by sector. Separate commercial banking. |
| `mkt_d_sect_decile.do` | Share of industry in each decile by change in ln(average # of markets). |
| `mkt_d_ind_0.do` | do file that calculates change in ln(markets) by industry. |
| `mkt_d_ind_vs_top_mkt.do` | Change in ln(markets) of top vs all firms. Top defined based on # of markets. |
| `mkt_d_ind_vs_top_emp.do`^- | Change in ln(markets) of top vs all firms. Top defined based on employment. |
| `mkt_d_ind_sum.do` | Change in ln(markets) vs change in ln(industry employment or pay). |
| `mkt_d_ind_con.do` | Change in ln(markets) vs change in industry concentration. |
| `mkt_d_ind_aux.do` | Change in ln(markets) vs change in ln(auxiliary employment) (using fk list of auxiliary). |
| `mkt_d_ind_aux_imp.do` | Change in ln(markets) vs change in ln(auxiliary employment) by "imputing" auxiliary employment. |
| `mkt_d_ind_aux_imp_top.do` | Change in ln(markets) vs change in ln(top / all auxiliary employment) by "imputing" auxiliary employment. |
| `mkt_d_ind_aux_imp_firm.do` | Demeaned ln(markets) vs demeaned ln(auxiliary employment) at the firm level for selected industries. |
| `mkt_d_ind_bea_ip.do` | Change in ln(markets) vs change in ln(ip/structure stock) by BEA naics industries. |
| `city_emp_emps_ir.do` | City emp in 1977 vs employment share of IR industries. |
| `city_mgrow_sales.do` | Missing growth based on Sales. |
| `city_emp_city_sum_d.do` | City emp in 1977 vs change in numbers of firms, establishments, etc. |


| `city_emp_top_mkt_firms.do` | Change in log(share of top 1, 10% firms employment) in MSA |
| `city_new_ind_emp_share_top_mkt.do` | New Industry Shares in city using top defined by markets |
| `city_new_ind_emp_share_top_sales.do` | New Industry Shares in city using top defined by markets |
| `city_sales_top_mkt_firms.do` | Change in log(share of top 1,10% firms sales) in MSA|
| `emp_sales_top_time_series.do` | Emp, Sales top firms shares time series |
| `mkt_d_sect_quintile.do` | SV average every 5 years for top and bottom quintiles of chg in ln(mkt/firm) |
| `mkt_d_sect_sum_top.do` | Time series of change in ln(mkts/firm) of top firms |
| `mktsize_d_ind_top.do` | Change in Ln(mkt size of top 10% / mkt size of all) on change in ln(est/firm of top 10%)|
| `nind_hhi_top_firms.do` | # of industries, within-firm HHI ratios of top 10%/all for 5-years |
| `summary_stats.do` | Summary Stats for appendix |






